<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
<meta charset="UTF-8"/>
<title>运营平台</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="renderer" content="webkit">
<!--<meta http-equiv="X-UA-Compatible" content="IE=edge">-->
<link type="text/css" rel="stylesheet" href="<?php echo get_style_cdnurl();?>paimai/yunying/css/common.css?v=20170207" />
<link type="text/css" rel="stylesheet" href="<?php echo get_style_cdnurl();?>paimai/yunying/css/table.css?v=20170117" />
<link type="text/css" rel="stylesheet" href="<?php echo get_style_cdnurl();?>paimai/yunying/css/jquery-ui.css" />
<script src="<?php echo get_style_cdnurl();?>paimai/yunying/js/jquery-1.11.1.js" type="text/javascript"></script>
<script src="<?php echo get_style_cdnurl();?>paimai/yunying/js/jquery-ui.min.js" type="text/javascript"></script>
 <script src="<?php echo get_style_cdnurl();?>paimai/yunying/js/yunIndex.js" type="text/javascript"></script>
<script src="<?php echo get_style_cdnurl();?>paimai/yunying/js/jquery-ym-datePlugin-0.1.js" type="text/javascript"></script>
<script src="<?php echo get_style_cdnurl();?>paimai/yunying/js/global.js" type="text/javascript"></script>
<script src="<?php echo get_style_cdnurl();?>paimai/cheshan/js/common.js" type="text/javascript"></script>
<script type="text/javascript" src="<?php echo get_style_cdnurl();?>paimai/yunying/js/jquery.placeholder.min.js"></script>
<script type="text/javascript">
 $(function(){
     $("input").placeholder();
     if (navigator.userAgent.indexOf("Safari") > -1) {
       $("input").css("lineHeight","normal !important");
     };
});
</script>

</head>
<body>
<div class="header">
<div class="headerCo">
<span>你好,<?php echo ($user_info["real_name"]); ?><a href="<?php echo (WEB_URL); ?>Emp/logout">退出</a></span>
<h1><img src="<?php echo get_style_cdnurl();?>paimai/yunying/images/yun_logo.jpg"></h1>
</div>
</div>
<div class="mian">
<div class="mianL">
    <dl>
        <dd>
            <a id="menu_sy" href="/Index/index" class="shouye">首页</a>
        </dd>
        <?php foreach ($tree_menu as $key => $value): ?>
          <dd>
            <span id="menu_<?php echo ($value['first_char']); ?>" ><img src="<?php echo get_style_cdnurl();?>paimai/yunying/images/yun_jia.jpg"><?php echo ($value['name']); ?></span>
            <ul style="display: none;">
                <?php if (!empty($value['children'])): ?>
                    <?php foreach ($value['children'] as $k => $v): ?>
                        <li><a id='menu_<?php echo ($v["first_char"]); ?>' href="<?php echo ($v['url']); ?>"><?php echo ($v['name']); ?></a></li>
                    <?php endforeach ?>
                <?php endif ?>
            </ul>
        <?php endforeach ?>
    </dl>
</div>

<?php $menu = 'cxtj.ppcx'; ?>
<?php $menu=json_encode(explode('.', $menu)); ?>
<script>
    $(function () {
        var cur_menu = '<?php echo ($menu); ?>', cur_menu = eval('[' + cur_menu + ']'), cur_menu = cur_menu[0];
        if (cur_menu == "sy") {
            $("#menu_sy").removeClass('shouye').addClass('current');
        }
        $('#menu_' + cur_menu[0]).click();
        $('#menu_' + cur_menu[0]).find("img").attr("src", "http://img1.isou365.cn/paimai/yunying/images/yun_jie.jpg");
        $(".mianL").css("height", $(document).height() - 95);
        $('#menu_' + cur_menu[1]).addClass('current');
    });
</script>
    <div class="mianR">
        <div class="yuyue">
            <ul>
                <li class="yuCurrent">基本信息</li>
                <li>出价排名</li>
                <li>出价历史</li>
                <li>拍单状态跟踪</li>
                <li>智能报价</li>
            </ul>
        </div>
        <div class='listBox'>
            <div class="yuList" >
<!--                <h3 class='cha'>基本信息</h3>-->
                <div class='car_info'>
                    <div class='car_no'><span style="font-size:14px;">车辆编号：<b><?php echo ($car_info["car_source_nu"]); ?></b></span></div>
                    <table border='1' width='100%'>
                         <tbody>
                             <!--<tr>-->
                                <!--<td colspan='4' style="background-color:#c1c1c1;font-size:14px;"><span>车主信息</span></td>-->
                                <!--<td width="11%" style="color:#898b8a;">车主姓名</td>-->
                                <!--<td width="39%"><?php echo ($owner["seller_name"]); ?></td>-->
                                <!--<td width="11%" style="color:#898b8a;">车主电话</td>-->
                                <!--<td width="39%"><?php echo ($owner["phone"]); ?></td>-->
                             <!--</tr>-->
                             <tr>
                                 <td width="11%" style="color:#898b8a;">车主类型</td>
                                 <td width="39%"><?php echo ($owner["owner_type_name"]); ?></td>
                                 <?php if($owner["owner_type"] == 1): ?><td width="11%" style="color:#898b8a;">车主姓名</td>
                                     <td width="39%"><?php echo ($owner["seller_name"]); ?></td>
                                     <?php else: ?>
                                     <td width="11%" style="color:#898b8a;">公司名称</td>
                                     <td width="39%"><?php echo ($owner["seller_name"]); ?></td><?php endif; ?>
                             </tr>
                             <tr>
                                 <?php if($owner["owner_type"] == 1): ?><td width="11%" style="color:#898b8a;">联系电话</td>
                                     <td colspan="3"><?php echo ($owner["phone"]); ?></td>
                                     <?php else: ?>
                                     <td width="11%" style="color:#898b8a;">联系人姓名</td>
                                     <td width="39%"><?php echo ($owner["contact_person"]); ?></td>
                                     <td width="11%" style="color:#898b8a;">联系电话</td>
                                     <td width="39%"><?php echo ($owner["phone"]); ?></td><?php endif; ?>
                             </tr>
                         </tbody>
                    </table>
                    <table border='1' width='100%' style="margin-top:20px;">
                         <tbody>
                            <tr style="background-color:#c1c1c1;font-size:14px;">
                                <td colspan='3'><span>车辆信息</span></td>
                                <td>
                                    <a href="/Car/report/car_id/<?php echo ($car_info["car_id"]); ?>" target="_blank">
                                        <span style="float:right;padding-right: 10%;color:#20ab4f;">检测报告</span>
                                    </a>
                                </td>
                            </tr>
                            <tr>
                                <td width="11%" style="color:#898b8a;">车型</td>
                                <td width="39%"><?php echo ($car_info["model"]); ?></td>
                                <td width="11%" style="color:#898b8a;">排放标准</td>
                                <td width="39%"><?php echo ($car_info["mession"]); ?></td>
                            </tr>
                            <tr>
                                <td style="color:#898b8a;">初登日期</td>
                                <td><?php echo ($car_info["first_reg_date"]); ?></td>
                                <td style="color:#898b8a;">颜色</td>
                                <td><?php echo ($car_info["color"]); ?></td>
                            </tr>
                            <tr>
                                <td style="color:#898b8a;">表显里程</td>
                                <td><?php echo ($car_info["pointer_mileage"]); ?>万公里</td>
                                <td style="color:#898b8a;">车况级别</td>
                                <td><?php echo ($car_info["car_level"]); ?></td>
                            </tr>
                            <tr>
                                <td style="color:#898b8a;">车辆注册地</td>
                                <td><?php echo ($car_info["reg_city"]); ?></td>
                                 <td style="color:#898b8a;">车架号</td>
                                <td><?php echo ($car_info["car_vin"]); ?></td>
                            </tr>
                            <tr>
                                <td style="color:#898b8a;">车牌号</td>
                                <td><?php echo ($car_info["car_plate_number"]); ?></td>
                                <?php $transfer_type = array('1'=>'必须过本地','2'=>'必须过外户','3'=>'不限制'); ?>
                                <td style="color:#898b8a;">过户限制</td>
                                <td><?php echo ($transfer_type[$car_info['transfer_limit']]); ?></td>
                            </tr>
                             <tr>
                                <td style="color:#898b8a;">渠道来源</td>
                                <td>
                                    <?php if($car_info["comefrom"] != ''): if(empty($car_info['comefrom_url'])):?>
                                          <?php echo $show_from[$car_info['comefrom']];?>
                                        <?php else: ?>
                                          <a href="<?php echo ($car_info["comefrom_url"]); ?>" target="_blank" rel="noreferrer"><?php echo $show_from[$car_info['comefrom']];?></a>
                                        <?php endif;?>
                                      <?php else: ?>
                                          未知<?php endif; ?>
                                </td>
                                 <td style="color:#898b8a;">所在地</td>
                                 <td><?php echo ($car_info["location_area"]); ?></td>
                            </tr>
                         </tbody>
                    </table>
                    <?php if($order_info["is_other_channel_deal"] == 1): ?><div class='car_no' style="margin-top:20px;"><span style="font-size:14px;" >订单编号：<b><?php echo ($order_info["order_no"]); ?></b></span></div>
                        <table border='1' width='100%'>
                            <tbody>
                            <tr>
                                <td colspan='4' style="background-color:#c1c1c1;font-size:14px;"><span>订单信息</span></td>
                            <tr>
                                <td width="11%" style="color:#898b8a;">订单价格</td>
                                <td width="39%"><?php echo ($order_info["order_amount"]); ?></td>
                                <td width="11%" style="color:#898b8a;">收款单号</td>
                                <td width="39%"><?php echo ($order_info["collection_no"]); ?></td>
                            </tr>
                            <tr>
                                <td style="color:#898b8a;">交易佣金</td>
                                <td><?php echo ($order_info["transfer_fee"]); ?></td>
                                <td style="color:#898b8a;">采购单号</td>
                                <td><?php echo ($order_info["purchase_order_nu"]); ?></td>
                            </tr>
                            <tr>
                                <td style="color:#898b8a;">订单生成时间</td>
                                <td colspan="3"><?php echo ($order_info["create_time"]); ?></td>
                            </tr>
                            </tbody>
                        </table>
                    <?php else: ?>
                        <?php $order_type = array('0'=>'顺序拍','1'=>'定时拍') ?>
                        <div class='car_no' style="margin-top:20px;"><span style="font-size:14px;" >拍单编号：<b><?php echo ($order_info["order_no"]); ?></b></span></div>
                        <table border='1' width='100%'>
                            <tbody>
                            <tr>
                                <td colspan='4' style="background-color:#c1c1c1;font-size:14px;"><span>拍单信息</span></td>
                            <tr>
                                <td width="11%" style="color:#898b8a;">上拍场次</td>
                                <td width="39%"><?php echo ($order_info["scene_name"]); ?></td>
                                <td width="11%" style="color:#898b8a;">竞拍方式</td>
                                <td width="39%"><?php echo ($order_type[$order_info['is_timing_order']]); ?></td>
                            </tr>
                            <tr>
                                <td style="color:#898b8a;">竞拍时长</td>
                                <td><?php echo ($order_info["est_elapsed_time"]); ?></td>
                                <td style="color:#898b8a;">竞拍开始时间</td>
                                <td><?php echo ($order_info["bidding_start_time"]); ?></td>
                            </tr>
                            <tr>
                                <td style="color:#898b8a;">竞拍结束时间</td>
                                <td colspan="3">
                                    <?php if($order_info["order_status"] >= 4): echo ($order_info["bidding_end_time"]); ?>
                                        <?php else: ?>
                                        未结束<?php endif; ?>
                                </td>
                            </tr>
                            <tr>
                                <td style="color:#898b8a;">起拍价</td>
                                <td><?php echo ($order_info["bid_start_price"]); ?></td>
                                <td>建议起拍价</td>
                                <td><?php echo ($car_info["suggest_bid_start_price"]); ?>元</td>
                            </tr>
                            <tr>
                                <td style="color:#898b8a;">建议价</td>
                                <?php if($car_info['suggest_min_price']==0 && $car_info['suggest_max_price']==0):?>
                                <td> - - </td>
                                <?php else:?>
                                <td><?php echo ($car_info["suggest_min_price"]); ?>元 - <?php echo ($car_info["suggest_max_price"]); ?>元</td>
                                <?php endif;?>
                                <td style="color:#898b8a;">可用代金券</td>
                                <td><?php echo ($order_info["coupon"]); ?></td>
                            </tr>
                            <tr>

                                <td style="color:#898b8a;">保留价</td>
                                <td><?php echo ($order_info["reserve_price"]); ?>
                                    <?php if($order_info["show_reserve_price"] == 1): ?><img src="<?php echo get_style_cdnurl();?>paimai/yunying/images/eye.png"/><?php endif; ?>
                                </td>
                                <td style="color:#898b8a;">交易服务费</td>
                                <td><?php echo ($order_info["commision"]); ?></td>
                            </tr>
                            <tr>
                                <td style="color:#898b8a;">拍卖最高价</td>
                                <td><?php echo ($order_info["bidding_best_price"]); ?></td>
                                <td style="color:#898b8a;">交付服务费</td>
                                <td><?php echo ($order_info["transfer_fee"]); ?></td>
                            </tr>
                            <tr>
                                <?php if($order_info["is_consult"] == 1 AND $order_info["consult_status"] != 5): ?><td style="color:#898b8a;">磋商成交价</td>
                                    <td><?php echo format_money($order_info['success_price']+$order_info['company_subsidies']);?></td>
                                    <td style="color:#898b8a;">公司补贴</td>
                                    <td><?php echo ($order_info["company_subsidies"]); ?>元</td>
                                    <?php elseif(($order_info["order_status"] >= 7 AND $order_info["order_status"] != 6 AND $order_info["order_status"] != 12) AND $order_info["fail_type"] != 2): ?>
                                    <td style="color:#898b8a;">确认成交价格</td>
                                    <td class="name-text"><?php echo format_money($order_info['success_price']);?>元</td>
                                    <td style="color:#898b8a;">公司补贴</td>
                                    <td class="name-text">无</td><?php endif; ?>
                            </tr>
                            </tbody>
                        </table><?php endif; ?>
                </div>
            </div>
            
            <div class='yuList' style='display:none'>
                <table border='1' width='100%' style='margin-top:20px;'>
                    <tr style='height:50px;'>
                        <td>出价排名</td>
                        <td>车商联系人</td>
                        <td>联系人电话</td>
                        <td>价格</td>
                        <td>出价方式</td>
                        <td>出价时间</td>
                    </tr>
                    <?php $bid_type = array('1'=>'投标','2'=>'竞价') ?>
                    <?php if(empty($bid_history_rank_list_data)): ?><tr height='30'><td colspan="6">暂无出价排名！</td></tr>
                        <?php else: ?>
                        <?php if(is_array($bid_history_rank_list_data)): $i = 0; $__LIST__ = $bid_history_rank_list_data;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$bh): $mod = ($i % 2 );++$i;?><tr height='30'>
                                <td>第<?php echo ($bh["sort"]); ?>名</td>
                                <td><?php echo ($bh["dealer_name"]); ?></td>
                                <td><?php echo ($bh["contact_mobile"]); ?></td>
                                <td><?php echo ($bh["price"]); ?>元</td>
                                <td><?php echo ($bid_type[$bh['type']]); if($bh["consult_type"] == 1): ?>（磋商）<?php endif; ?></td>
                                <td><?php echo ($bh["createtime"]); ?></td>
                            </tr><?php endforeach; endif; else: echo "" ;endif; endif; ?>
                </table>
            </div>
            
            <div class='yuList' style='display:none'>
                <table border='1' width='100%' style='margin-top:20px;'>
                    <tr style='height:50px;'>
                        <!--<td>出价排名</td>-->
                        <td>车商联系人</td>
                        <td>联系人电话</td>
                        <td>价格</td>
                        <td>出价方式</td>
                        <td>出价时间</td>
                    </tr>
                    <?php $bid_type = array('1'=>'投标','2'=>'竞价（手动报价）','3'=>'竞价（智能报价）') ?>
                    <?php if(empty($bid_history_list)): ?><tr height='30'><td colspan="6">暂无出价记录！</td></tr>
                        <?php else: ?>
                        <?php if(is_array($bid_history_list)): $i = 0; $__LIST__ = $bid_history_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$bh): $mod = ($i % 2 );++$i;?><tr height='30'>
                                <!--<td>第<?php echo ($bh["sort"]); ?>名</td>-->
                                <td><?php echo ($bh["dealer_name"]); ?></td>
                                <td><?php echo ($bh["contact_mobile"]); ?></td>
                                <td><?php echo ($bh["price"]); ?>元</td>
                                <td><?php echo ($bid_type[$bh['type']]); if($bh["consult_type"] == 1): ?>（磋商）<?php endif; ?></td>
                                <td><?php echo ($bh["createtime"]); ?></td>
                            </tr><?php endforeach; endif; else: echo "" ;endif; endif; ?>
                </table>
            </div>

            <div class="yuList" style='display:none'>
                <h3 class="yonghu" style="margin-top:25px;">拍单状态跟踪</h3>
                <div class="yonghuText">
                    <h2>拍卖单号：<?php echo ($order_info["order_no"]); ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <?php echo ($car_info["reg_city"]); ?> - <?php echo ($car_info["model"]); ?>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        当前状态：<?php echo ($order_info["order_status_name"]); ?>
                    </h2>
                    <ul>
                        <li class="clearfix" style="border-bottom:1px solid #ececec;font-weight:bolder;">
                            <em>发生时间</em>
                            <em>执行操作</em>
                            <em>操作人</em>
                        </li>
                        <?php if(is_array($order_action_log)): $i = 0; $__LIST__ = $order_action_log;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$ol): $mod = ($i % 2 );++$i;?><li class="clearfix">
                                <em><?php echo ($ol["createtime"]); ?></em>
                                <em><?php echo ($ol["action_name"]); ?></em>
                                <em><?php echo ($ol["emp_name"]); ?></em>
                            </li><?php endforeach; endif; else: echo "" ;endif; ?>
                    </ul>
                </div>
            </div>

			<div class="yuList" style='display:none'>
				<div class="yuyue1">
		            <ul>
		                <li class="yuCurrent">报价队列</li>
		                <li>报价历史</li>
		            </ul>
		        </div>
		        <div class='listBox1'>
			        <div id="data1" class="yuList1" style="display:block">
			        </div>
			        <div id="data2" class="yuList1" style="display:none">
			        
			        </div>
			    </div>
			</div>

        </div>
        <div class="yongBtn" style='width:170px;'>
            <input type="button"  class="quxiao" onclick="window.close()" value="关闭" />
        </div>
    </div>
</div>
<script type="text/javascript">
$(".yuyue1").find("ul li").click(function(){			
	$(".yuyue1").find("ul li").removeClass("yuCurrent");						
	$(this).addClass("yuCurrent");			
	var index=$(".yuyue1").find("ul li").index(this);
	$(".listBox1").find(".yuList1").eq(index).fadeIn().siblings().hide();
});

getPriceQueue(1);
function getPriceQueue(page){
	var url = '/OrderCheck/price_queue/id/<?php echo I("get.id");?>/p/'+page;
	$.get(url, function(data){
		$('#data1').html(data);
	});
}


getPriceHistory(1);
function getPriceHistory(page){
	var url = '/OrderCheck/price_history/id/<?php echo I("get.id");?>/p/'+page;
	$.get(url, function(data){
		$('#data2').html(data);
	});
}



function setMethod(m){
    $("#service_method").val(m);
}

function setStatus(status){
    $("#business_status").val(status);
}

$(".other_remark").blur(function(){
    $("#reserve_remark").val($(this).val());
});


$(".gencuur").click(function(){
    var str = $(this).children("font").html();
    $("#reserve_remark").val(str);
});
</script>
</body>
</html>